#include "qopenharmonycamerasession.h"
#include "qopenharmonymediacontainercontrol.h"


QT_BEGIN_NAMESPACE

QOPenHarmonyMediaContainerControl::QOPenHarmonyMediaContainerControl(QOPenHarmonyCameraSession *session)
    : QMediaContainerControl()
    , m_session(session)
{

}

QString QOPenHarmonyMediaContainerControl::containerFormat() const
{
    //TODO
    return QString();
}

QStringList QOPenHarmonyMediaContainerControl::supportedContainers() const
{
    return QStringList() << QLatin1String("ts")
                         << QLatin1String("mp4")
                         << QLatin1String("mkv")
                         << QLatin1String("m4a")
                         << QLatin1String("aac")
                         << QLatin1String("mp3")
                         << QLatin1String("ogg")
                         << QLatin1String("wav")
                         << QLatin1String("webm");

}

void QOPenHarmonyMediaContainerControl::setContainerFormat(const QString &format)
{
    //TODO
    Q_UNUSED(format);
}

QString QOPenHarmonyMediaContainerControl::containerDescription(const QString &formatMimeType) const
{
    if (formatMimeType == QLatin1String("ts"))
        return tr("TS media file format");
    else if (formatMimeType == QLatin1String("mp4"))
        return tr("MPEG4 media file format");
    else if (formatMimeType == QLatin1String("mkv"))
        return tr("MKV media file format");
    else if (formatMimeType == QLatin1String("m4a"))
        return tr("AAC file format");
    else if (formatMimeType == QLatin1String("aac"))
        return tr("AAC file format");
    else if (formatMimeType == QLatin1String("mp3"))
        return tr("MP3 file format");
    else if (formatMimeType == QLatin1String("ogg"))
        return tr("VORBIS file format");
    else if (formatMimeType == QLatin1String("wav"))
        return tr("PCM file format");
    else if (formatMimeType == QLatin1String("webm"))
        return tr("WEBM file format");

    return QString();
}

QT_END_NAMESPACE
